Meena Sharma1, Gaurav Verma2
1Department of Mathematics, Khalsa College for Women, Ludhiana, Punjab, India.
2Research Scholar, I.K.G Punjab Technical University, Punjab, India.
*Corresponding Author Email: gk_gaurav35@yahoo.com
ABSTRACT:
MATLAB is a significant tool for academicians, researchers, and engineers. The main feature of the MATLAB is its computational environment combined with and the straightforward interface, toolkits, modeling capabilities etc. MATLAB also stands as programming language and an environment serving the technical needs of a wide range of mathematicians. MATLAB relieves you of a lot of the mundane tasks associated with solving problems numerically. This allows you to spend more time thinking, and encourages you to experiment. MATLAB makes use of highly respected algorithms and hence you can be confident about your results.The purpose of the paper is to discuss the role of MATLAB in mathematics. The paper deals with the brief introduction of MATLAB, MATLAB programming and various features of the MATLAB. The various fundamental operations of MATLAB are discussed in the paper which are helpful for the students for performing mathematics problems.
KEYWORDS: MATLAB, Mathematics
1. INTRODUCTION:
MATLAB (matrix laboratory) is a numerical computing environment and fourth-generation programming language developed by MathWorks. Cleve Moler was the creator of the first version of MATLAB in late 1970’s. He was the chairman of the computer science department of University of New Mexico. This first version of MATLAB was to make the students understand complicated computations. .In 1984, Moler and Jack Little re-developed MATLAB in C language. Jack realized the commercial potential of this language and soon they opened MathWorks. They continued the development of this language in MathWorks.
In 2004, Mathwork’s three men, J. H. Wilkinson, George Forsythe, and John Todd, played important roles in the development of MATLAB. They designed it to help the students for accessing LINPACK and EISPACK without using Fortran[1]. It has since evolved into a successful commercial software. MATLAB allows matrix manipulations, plotting of functions and data, implementation of algorithms, creation of user interfaces, and interfacing with programs written in other languages, including C, C++, C#, Java, Fortran and Python. Although MATLAB is mainly used for numerical computing, an optional toolbox uses the MuPAD symbolic engine, allowing access to symbolic computing abilities. An additional package, Simulink, allows graphical multi-domain simulation and model-based design for dynamic and embedded systems. MATLAB users come from various backgrounds of engineering, science, and Economics[2].
2. MATLAB as Programming Language
MATLAB is an easy to operate platform which is designed with 4th generation programming language. Some experts don’t even consider it as a programming language and some feel it is a very valuable programming language. It is majorly used to do computational tasks in high level mathematics or various other fields. Though it was initially only for computing purpose, it has now diversified into various other fields. It has been modified to have various new features which have enhanced its performance in all the applications it is used in. Academia department, Science, engineering and economics are the domains which make the maximum usage of MATLAB programming software. Even control design engineers also found this programming language very useful. Now a days usage of MATLAB is significant in almost every domain. Numerical analysis and linear algebra are also taught using MATLAB in educational institutes. This language can be used for many programming purposes because it is very dynamic. It allows for the implementation of algorithms and matrix manipulations. Furthermore, it is used for the plotting of data and functions together with the creation of user interfaces.
3. Main Features of MATLAB:
MATLAB is the easiest and most productive software for academic researchers, engineers and scientists. Whether a person is analysing data, developing algorithms, or creating models, MATLAB provides an environment that invites exploration and discovery. It combines a high-level language with a desktop environment tuned for iterative engineering and scientific workflows. The matrix-based MATLAB language is the world’s most natural way to express computational mathematics. This makes it straightforward to capture the mathematics behind your ideas, which means your code is easier to write, easier to read and understand. MATLAB does the hard work to ensure your code runs quickly. Math operations are distributed across multiple cores on your computer, library calls are heavily optimized, and all code is just-in-time compiled. You can run your algorithms in parallel by changing for-loops into parallel for-loops or by changing standard arrays into GPU or distributed arrays. Run parallel algorithms in infinitely scalable public or private clouds with no code changes. The MATLAB language also provides features of traditional programming languages, including flow control, error handling, object-oriented programming, unit testing, and source control integration. MATLAB provides a desktop environment tuned for iterative engineering and scientific workflows. Integrated tools support simultaneous exploration of data and programs, letting you evaluate more ideas in less time.
• You can interactively preview, select, and preprocess the data you want to import.
• An extensive set of built-in math functions supports your engineering and scientific analysis.
• 2D and 3D plotting functions enable you to visualize and understand your data and communicate results.
• MATLAB apps allow you to perform common engineering tasks without having to program. Visualize how different algorithms work with your data, and iterate until you’ve got the results you want.
• The integrated editing and debugging tools let you quickly explore multiple options, refine your analysis, and iterate to an optimal solution.
• You can capture your work as sharable, interactive narratives.
Comprehensive, professional documentation written by engineers and scientists is always at your fingertips to keep you productive. Reliable, real-time technical support staff answers your questions quickly. And you can tap into the knowledge and experience of over 100,000 community members and MathWorks engineers on MATLAB Central, an open exchange for MATLAB and Simulink® users. MATLAB and add-on toolboxes are integrated with each other and designed to work together. They offer professionally developed, rigorously tested, field-hardened, and fully documented functionality specifically for scientific and engineering applications.
4. Mathematical operations using MATLAB:
(i) Plotting of Functions: We have taken examples of different functions which can be plotted using MATLAB programs.
(a) Exponential Function
x = 1:5;
y = exp(x);
plot (x, y)
Here we get plot of the array x versus the array y i.e., a discrete version of the exponential function exp(x) over the range x=1 to x=5.
(b) Cosine Function program
x = 0:.01:5;
y = cos(2*pi*x);
plot(x , y)
Here we have set the variable x as a fine discretisation of the range from x=0 to x=5, define y as the cosine of 2 pi x over that range, and plots x against y - showing us the familiar sinusoidal waves.
(ii) Matrix Multiplication by Using MATLAB:
The following example will show how MATLAB performs matrix multiplication.This is a basic MATLAB script that when run, will multiply two matrices.
· % Name: mamu
· % Purpose: Execute a matrix multiplication
· %
· % Create the first matrix
· matrA = [1 2 3; 4 5 6];
· % Create the second matrix
· matrB = [1 2 3 4; 5 6 7 8; 9 10 11 12];
· % Assign matrix multiplication result to a variable
· matrR = matrA * matrB;
· >> mamu
· >> matrR
·
· matrR =
·
· 38 44 50 56
· 83 98 113 128
(iii) Approximation of root of non-linear equation lying in (a,b) i.e. Bisection Method
Function (c, yc) = Bisect (f, a, b, delta)
% Input – f is the function input as a string “f”
% - a and b are end points of the interval
% Output – c is the zero.
% - yc = f(c)
% - ya = feval (f, a) ;
% - yb = feval (f, b) ;
If - ya*yb > 0, break, end.
Max 1 = 1 + round( log(b-a)- log delta)/log2
For k = 1: max 1
c = (a+b)/2
If yc = 0 , then end.
(iv) Plot the surface defined by the function
f(x, y) = (x - 3)^2 - (y -2)^2
for 2 ≤ x ≤ 4 and 1 ≤ y ≤ 3.
>> [X,Y] = meshgrid(2:.2:4, 1:.2:3);
>> Z = (X-3).^2-(Y-2).^2;
>> mesh(X,Y,Z)
>> title('Saddle'), xlabel('x'),ylabel('y')
5. REFERENCES:
1. Moler, C., "The Origins of MATLAB". Retrieved 15 April 2007.
2. "MATLAB Programming Language". Altius Directory. Retrieved 17 December 2010.
3. David F. G., “An Introduction to MATLAB”, March 2015.
4. "Matrix Indexing". MathWorks. Retrieved 14 August 2013.
5. Considering Performance in Object-Oriented MATLAB Code, Loren Shure, MATLAB Central, 26 March 2012.
6. Steinhaus, Stefan, "Comparison of mathematical programs for data analysis"2008.
7. Moler, C., "The Growth of MATLAB and The MathWorks over Two Decades". News & Notes Newsletter. MathWorks. Retrieved 14 August 2013.
8. Mathews J., Fink K., “Numerical methods using matlab”,McGraw Hill, 1999.
Received on 23.12.2016 Accepted on 31.12.2016
©A&V Publications all right reserved
Research J. Engineering and Tech. 2016; 7(4): 179-181.
DOI: 10.5958/2321-581X.2016.00031.3